Professional Documents
Culture Documents
Simple
Secure
Dynamic
Desktop Client
Miscellaneous Features
Core XML Support
Supplementary Character Support
JDBC RowSets
Class file
containing Windows Pentium PC system
Bytecodes Class Loader
Bytecode Pentium
Class Loader Verifier machine level
Bytecode JIT compiler instructions
verifier
JIT compiler
JavaFX
JavaFX Script
JavaFX Mobile
Example 2:
String[] Words = new String[2];
Words[0]=new String(“Bombay”);
Words[1]=new String(“Pune”);
Type method_name(arguments ){
body
}…..
} //class ends.
Final Methods
final methods cannot be overridden
Methods declared as static are implicitly final
Also methods declared private are implicitly
final
Pooja str
str1
© Copyright aurionPro Solutions Ltd.
StringBuffer
Class
Peer class of String class that represents fixed
length, immutable char sequence
StringBuffer represents growable and
writeable character sequence
Insertions at particular positions are possible
through this class
DownCasting
String s1 = (String) o;
String s2 = (Serializable) s
}
Example
javac –d . Balance.java
javac –d E:\JavaAss\MyAss Balance.java
Same class Y Y Y Y
Package P1
Class A
Package P2
Exception Error
Example:
public void passgrade(int a, int total) {
if (a > total)
throw new ArithmeticException();
}
* @author patni
* @see java.awt.BaseWindow
*/
class Window extends BaseWindow { ... }
url=jdbc:oracle:thin:@192.168.12.16:1521:oracl
e8i
driver=oracle.jdbc.driver.OracleDriver
© Copyright aurionPro Solutions Ltd.
Types of
properties
System properties:
System properties give information about the
environment of the program ,in which it is
running such as JVM it is running in, Operating
System name and version, java home and
many more properties
FileOutputStream(String filepath)
FileOutputStream(File fileobj)
ByteArrayInputStream(byte array[])
numbytes)
access can be r or rw
void seek( long newPos);
Terminates
Dead
Container
(abstract)
Panel Window
Menu Component
(abstract)
Menubar MenuItem
Menu CheckboxMenuItem
PopupMenu
AWT Event
Key Mouse
Event Event
© Copyright aurionPro Solutions Ltd.
Event sources,classes &
interfaces
Event Type Event Source Listener registration Event listener
and removal methods interface
provided by the implemented by
source a listener
ActionEvent Button addActionListener ActionListener
List removeActionListener
MenuItem
TextField
Adjustment Scrollbar addAdjustmentListener AdjustmentListene
Event removeAdjustmentListe r
ner
ItemEvent Choice addItemListener ItemListener
Checkbox removeItemListener
CheckboxMenuItm
List
TextEvent TextArea addTextListener TextListener
TextField removeTextListener
Lightweight Components
Components are not dependent on native peers
to render themselves. Instead, they use
simplified graphics primitives to paint
themselves on the screen and can even allow
portions to be transparent
JContainer
(abstract)
JPanel JWindow
Model Component
Interface
ButtonModel Jbutton, JCheckBox, JRadioButton,
JMenuItem
BoundedRangeMod JProgressBar, JScrollBar, JSlider
el
Document JTextField, JTextArea, JTextPane
etc.
Scroll
Provide automatic scrolling facility
Horizontal and vertical headers are possible
void setValueAt(Object,int,int)
Oracle SQL
DB 2
Database Server
JDBC
HTTP,RMI,CORBA
Application
Propriety server (JAVA) Business
protocol logic
Database JDBC
server
Propriety protocal
DBMS
Connection ResultSet
Interfaces
in java.sql
DatabaseMetaData
ResultSetMetaData
Driver
Connection
while (rs.next()) {
String s = rs.getString("name");
BigDecimal n =
rs.getBigDecimal("age");
System.out.println(s + " " + n);
}
call.registerOutParameter(1,Types.INTEGER);
call.execute();
int val=call.getInt(1);
System.out.println(“There are ” +val + “ employees”);
con.commit()
con.rollback()
try {
con.setAutoCommit(false);
// perform transactions
con.commit()
con.setAutoCommit(true);
} catch (SQLException e) {
© Copyright aurionPro Solutions Ltd.
Collections
Framework in Java